package utils;


import com.fasterxml.jackson.databind.JsonNode;
import play.libs.Json;

public class ResponseResult {
    public  boolean status;
    public  String  msg;
    public  Object  object;

    public ResponseResult() {
    }

    public ResponseResult(boolean status, String msg, Object object) {
        this.status = status;
        this.msg = msg;
        this.object = object;
    }

    public static JsonNode wrong(String msg,Object object){
        ResponseResult responseResult = new ResponseResult(false,msg,object);
        return Json.toJson(responseResult);
    }
    public static JsonNode ok(String msg,Object object){
        ResponseResult responseResult = new ResponseResult(true,msg,object);
        return Json.toJson(responseResult);
    }
}
